package com.kitty.action;

import java.util.Date;

import com.kitty.service.IUserMgr;
import com.opensymphony.xwork2.ActionSupport;

public class User extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 67347322726368739L;
	
	private String id;
	private String email;
	private String pwd;
	private String name;
	private Date validTo;
	
	private IUserMgr serviceUser;
	
	
	public String addUser() {return SUCCESS;}
	
	public String save() throws Exception {
		serviceUser.addUser(id, email, pwd, name, validTo);
		return SUCCESS;
	}

	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getValidTo() {
		return validTo;
	}

	public void setValidTo(Date validTo) {
		this.validTo = validTo;
	}

	public IUserMgr getServiceUser() {
		return serviceUser;
	}

	public void setServiceUser(IUserMgr serviceUser) {
		this.serviceUser = serviceUser;
	}

}
